package com.mlnx.data.dao;

import com.mlnx.data.entity.EcgInfo;
import com.mlnx.data.pojo.vo.EcgHeartVo;

import java.util.List;
import java.util.Map;

/**
 * Created by amanda.shan on 2017/12/28.
 */
public interface EcgStore {

    void init();

    // 每秒钟保存所花费的时间
    Long getSaveTimeBySecond();

    boolean save(EcgInfo ecg);

    boolean save(List<EcgInfo> ecgs);

    void delete(Integer patientId);

    long count(Integer patientId);

    List<EcgHeartVo> getEcgHeartVos(long startTime, long endTime, int patientId, Integer limit);

    List<Map> getEcg(long startTime, long endTime, int patientId, Integer limit);

    List<Map> getEncryEcg(long startTime, long endTime, int patientId, Integer limit);

    List<Map> getFilterEcg(long startTime, long endTime, int patientId, Integer limit);

    List<Map> getFilterEcg(Integer patientId, Long startTime, Integer limit);

    List<Map> getEcg(Integer patientId, Long startTime, Integer limit);

    List<Map> getEncryEcg(Integer patientId, Long startTime, Integer limit);

    List<Map> getLastEcgTime(Integer patientId, Long startTime, Integer limit);

    void saveEcgReportData(String reportNumeration, byte[] bytes);

    byte[] getEcgReportData(String reportNumeration);
}
